<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>档案管理系统</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

    <link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/dist/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/dist/css/ionicons.min.css">
    <link rel="stylesheet" href="/static/dist/css/AdminLTE.min.css">
    <link rel="stylesheet" href="/static/dist/css/skins/all-skins.min.css">
    <link rel="stylesheet" href="/static/css/bootstrap-treeview.css">
    <link rel="stylesheet" href="/static/css/bootstrapValidator.min.css">
    <link rel="stylesheet" href="/static/css/bootstrap-table.min.css">
    <link rel="stylesheet" href="/static/layer/theme/default/layer.css">
    <link rel="stylesheet" href="/static/css/viewer.min.css">
    <link rel="stylesheet" href="/static/webCss/rgckgryf.css?v=shujubuwqd12138">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="/static/plugins/ie9/html5shiv.min.js"></script>
    <script src="/static/plugins/ie9/respond.min.js"></script>
    <![endif]-->
</head>
<body class="hold-transition skin-blue" style="font-size: medium">


<div class="content " id="yhgl">
    <div class="row">
        <div class="modal" id="zfrgyjModal" data-backdrop="static">
            <div class="modal-dialog" style="height: 500px">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">入馆意见</h4>
                    </div>
                    <div class="modal-body">
                        <form role="form" id="rgyjzfForm">
                            <div class="form-group">
                                <label>入馆意见</label>
                                <textarea class="form-control" v-model="rgyjzf" name="rgyjzf"></textarea>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default pull-left" data-dismiss="modal" @click="closezf">关闭</button>
                        <button @click.prevent="surezf" type="submit" class="btn btn-primary">确认</button>
                    </div>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
        </div>
    </div>

    <div class="row">
        <div id="tree3">
            <img id="tree3Img" dataUrl="http://211.159.186.65:33333/api/fj/downloadFj?type=1&fileName=1590982068983.jpg">
        </div>
        <div class="col-xs-3 left">
            <div class="row" style="height: 54px;border-bottom: 1px solid #E0E0E0">
                <label class="col-xs-4" style="color: #3A3A3A;font-weight: 600;padding-top: 17px;font-size: 16px">档案材料</label>
            </div>
            <div style="height: 700px;overflow: auto">
                <div id="tree5"></div>
            </div>
        </div>
        <div class="col-xs-9 right">
            <div class="row" style="height: 54px;border-bottom: 1px solid #E0E0E0">
                <label class="col-xs-4" style="color: #3A3A3A;font-weight: 600;padding-top: 17px;font-size: 16px" v-show="clButton">档案基本信息</label>
            </div>
            <div v-show="da">
                <div class="row" style="height: 653px">
                    <div class="nav-tabs-custom">
                        <!-- Tabs within a box -->
                        <ul class="nav nav-tabs pull-right">
                            <li class="pull-left"><i class="fa fa-inbox"></i> 基本信息</li>
                            <div class="btn-group col-xs-offset-6" style="padding-top: 17px;">
                                <!--<a class="btn btn-primary" style="background-color: #ffffff;color: #2C75E8;width: 64px;height: 25px;border-radius:2px 0px 0px 2px;padding: 2px;margin-left: 400px;margin-top: -17px;"@click.prevent="mySubmit" :disabled="zzmySubmit">保存</a>-->
                            </div>
                        </ul>
                        <div class="tab-content no-padding">
                            <!-- Morris chart - Sales -->
                            <div class="chart tab-pane active" style="position: relative">
                                <div class="row">
                                    <div class="form-group col-xs-6">
                                        <label>档案编号*</label>
                                        <input name="dabh" v-model="gryf.dabh" type="text" class="form-control input-sm" readonly>
                                    </div>
                                    <div class="form-group col-xs-3">
                                        <label>类型名称</label>
                                        <input v-model="gryf.typeName" name="typeName" type="text" class="form-control input-sm" readonly>
                                    </div>
                                    <div class="form-group col-xs-3">
                                        <label>年份*</label>
                                        <input v-model="gryf.year" name="year" type="text" class="form-control input-sm" readonly>
                                    </div>
                                    <div class="form-group col-xs-3">
                                        <label>申请人</label>
                                        <input v-model="gryf.sqr" name="sqr" type="text" class="form-control input-sm" readonly>
                                    </div>
                                    <div class="form-group col-xs-3">
                                        <label>审批时间</label>
                                        <input v-model="gryf.spsj" name="spsj" type="text" class="form-control input-sm" readonly>
                                    </div>
                                    <div class="form-group col-xs-3">
                                        <label>起始页码</label>
                                        <input v-model="gryf.qsym" name="qsym" type="text" class="form-control input-sm" readonly>
                                    </div>
                                    <div class="form-group col-xs-3">
                                        <label>终止页码</label>
                                        <input v-model="gryf.zzym" name="zzym" type="text" class="form-control input-sm" readonly>
                                    </div>
                                    <div class="form-group col-xs-3">
                                        <label>总页数</label>
                                        <input v-model="gryf.zys" name="zys" type="text" class="form-control input-sm" readonly>
                                    </div>
                                    <div class="form-group col-xs-3">
                                        <label>总盒号</label>
                                        <input v-model="gryf.zhh" name="zhh" type="text" class="form-control input-sm" readonly>
                                    </div>
                                    <div class="form-group col-xs-3">
                                        <label>登记人</label>
                                        <input v-model="gryf.djr" name="djr" type="text" class="form-control input-sm" readonly>
                                    </div>
                                    <div class="form-group col-xs-3">
                                        <label>登记时间</label>
                                        <input v-model="gryf.inputtime" name="inputtime" type="text" class="form-control input-sm" readonly>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="nav-tabs-custom">
                        <ul class="nav nav-tabs pull-right">
                            <li class="pull-left"><i class="fa fa-inbox"></i> 个人用房信息</li>
                        </ul>
                        <div class="tab-content no-padding">
                            <div class="chart tab-pane active" style="position: relative">
                                <div class="row">
                                    <div class="form-group col-xs-6">
                                        <label>镇/办事处</label>
                                        <input v-model="gryf.townBsc" name="town_bsc" type="text" class="form-control input-sm"  readonly>
                                    </div>
                                    <div class="form-group col-xs-6">
                                        <label>村/居委会</label>
                                        <input v-model="gryf.villageJwh" name="village_jwh" type="text" class="form-control input-sm"  readonly>
                                    </div>
                                    <div class="form-group col-xs-12">
                                        <label>申请事项</label>
                                        <input v-model="gryf.sqsx" name="sqsx" type="text" class="form-control input-sm" readonly>
                                    </div>
                                    <div class="form-group col-xs-12">
                                        <label>申请材料</label>
                                        <input v-model="gryf.sqcl" name="sqcl" type="text" class="form-control input-sm" readonly>
                                    </div>
                                    <div class="form-group col-xs-12">
                                        <label>备注</label>
                                        <textarea v-model="gryf.bz" name="bz" type="text" class="form-control input-sm" readonly></textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row text-center">
                    <div class="btn-group">
                        <a class="btn btn-primary up col-xs-11" @click="suretg">同意入馆</a>
                        <p class="col-xs-1" style="color: #E8E8E8;margin-top: 5px;">|</p>
                        <a class="btn btn-default down" @click="surebtg">退回</a>
                        <p class="col-xs-1" style="color: #E8E8E8;margin-top: 5px;">|</p>
                        <a class="btn btn-primary up" @click="zf" style="margin-left: 0px!important;">作废</a>
                    </div>
                </div>
            </div>
            <div v-show="cl">
                <!--<table class="table table-bordered table-hover text-center" id="daTable">-->

                <!--</table>-->
            </div>
        </div>

    </div>

</div>

<script src="/static/plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
<!-- Slimscroll -->
<script src="/static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="/static/plugins/fastclick/fastclick.js"></script>

<!-- AdminLTE App -->
<script src="/static/dist/js/app.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="/static/dist/js/demo.js"></script>
<!--tabs-->
<script src="/static/dist/js/app_iframe.js"></script>
<script src="/static/js/bootstrap-treeview.js"></script>
<script src="/static/js/bootstrapValidator.min.js"></script>
<script src="/static/js/bootstrap-table.min.js"></script>
<script src="/static/js/bootstrap-table-zh-CN.js"></script>
<script src="/static/js/vue.js"></script>
<script src="/static/js/vue-resource.min.js"></script>
<script src="/static/layer/layer.js"></script>
<script src="/static/js/myJs.js?v=shujubuwqd12138"></script>
<script src="/static/js/viewer.min.js"></script>
<script src="/static/js/newJs.js?v=shujubuwqd12138"></script>

<!--<script src="/static/js/jquery-viewer.js"></script>-->

<script type="text/javascript">
    newCss("/static/webCss/rgckgryf.css");
    var rgid;
    var id;
    var viewer2;
    var viewer;
    //键盘按下
    var kdLxNodes;
    var kdid;
    var kdId;
    var kdtreeNum;
    var nextid;
    var preid;
    var Id = 0;
    var ids = new Array();
    //记录节点id；
    var nodeId;
    var nodeId2;
    //记录节点的个数
    var index;
    var nodeCheckedSilent = false;

    window.document.onkeydown = isSearch;
    function isSearch(event) {
        var keynum;
        var keychar;
        var numcheck;

        if(window.event) // IE
        {
            keynum = event.keyCode
        } else if(event.which) // Netscape/Firefox/Opera
        {
            keynum = event.which
        }
        if(keynum === 37){
            if(kdtreeNum == 2){
                viewer2.destroy();
            }else if(kdtreeNum == 3){
                viewer.destroy();
            }
            openpre(kdLxNodes,kdid,0,kdtreeNum);
        }else if(keynum === 39){
            if(kdtreeNum == 2){
                viewer2.destroy();
            }else if(kdtreeNum == 3){
                viewer.destroy();
            }
            opennext(kdLxNodes,kdid,0,kdtreeNum);
        }
    }

    function nodeChecked(event, node) {
        if (nodeCheckedSilent) {
            return;
        }
        nodeCheckedSilent = true;
        checkAllParent(node);
        checkAllSon(node);
        nodeCheckedSilent = false;
    }

    var nodeUncheckedSilent = false;

    function nodeUnchecked(event, node) {
        if (nodeUncheckedSilent)
            return;
        nodeUncheckedSilent = true;
        uncheckAllParent(node);
        uncheckAllSon(node);
        nodeUncheckedSilent = false;
    }

    //选中全部父节点
    function checkAllParent(node) {
        $('#tree').treeview('checkNode', node.nodeId, {
            silent: true
        });
        var parentNode = $('#tree').treeview('getParent', node.nodeId);
        if (!("nodeId" in parentNode)) {
            return;
        } else {
            checkAllParent(parentNode);
        }
    }
    //取消全部父节点
    function uncheckAllParent(node) {
        $('#tree').treeview('uncheckNode', node.nodeId, {
            silent: true
        });
        var siblings = $('#tree').treeview('getSiblings', node.nodeId);
        var parentNode = $('#tree').treeview('getParent', node.nodeId);
        if (!("nodeId" in parentNode)) {
            return;
        }
        var isAllUnchecked = true; //是否全部没选中
        for (var i in siblings) {
            if (siblings[i].state.checked) {
                isAllUnchecked = false;
                break;
            }
        }
        if (isAllUnchecked) {
            uncheckAllParent(parentNode);
        }

    }

    //级联选中所有子节点
    function checkAllSon(node) {
        $('#tree').treeview('checkNode', node.nodeId, {
            silent: true
        });
        if (node.nodes != null && node.nodes.length > 0) {
            for (var i in node.nodes) {
                checkAllSon(node.nodes[i]);
            }
        }
    }
    //级联取消所有子节点
    function uncheckAllSon(node) {
        $('#tree').treeview('uncheckNode', node.nodeId, {
            silent: true
        });
        if (node.nodes != null && node.nodes.length > 0) {
            for (var i in node.nodes) {
                uncheckAllSon(node.nodes[i]);
            }
        }
    }

    var nodeCheckedSilent2 = false;

    function nodeChecked2(event, node) {
        if (nodeCheckedSilent2) {
            return;
        }
        nodeCheckedSilent2 = true;
        checkAllParent2(node);
        checkAllSon2(node);
        nodeCheckedSilent2 = false;
    }

    var nodeUncheckedSilent2 = false;

    function nodeUnchecked2(event, node) {
        if (nodeUncheckedSilent2)
            return;
        nodeUncheckedSilent2 = true;
        uncheckAllParent2(node);
        uncheckAllSon2(node);
        nodeUncheckedSilent2 = false;
    }

    //选中全部父节点
    function checkAllParent2(node) {
        $('#tree5').treeview('checkNode', node.nodeId, {
            silent: true
        });
        var parentNode = $('#tree5').treeview('getParent', node.nodeId);
        if (!("nodeId" in parentNode)) {
            return;
        } else {
            checkAllParent2(parentNode);
        }
    }
    //取消全部父节点
    function uncheckAllParent2(node) {
        $('#tree5').treeview('uncheckNode', node.nodeId, {
            silent: true
        });
        var siblings = $('#tree5').treeview('getSiblings', node.nodeId);
        var parentNode = $('#tree5').treeview('getParent', node.nodeId);
        if (!("nodeId" in parentNode)) {
            return;
        }
        var isAllUnchecked2 = true; //是否全部没选中
        for (var i in siblings) {
            if (siblings[i].state.checked) {
                isAllUnchecked2 = false;
                break;
            }
        }
        if (isAllUnchecked2) {
            uncheckAllParent2(parentNode);
        }

    }

    //级联选中所有子节点
    function checkAllSon2(node) {
        $('#tree5').treeview('checkNode', node.nodeId, {
            silent: true
        });
        if (node.nodes != null && node.nodes.length > 0) {
            for (var i in node.nodes) {
                checkAllSon2(node.nodes[i]);
            }
        }
    }
    //级联取消所有子节点
    function uncheckAllSon2(node) {
        $('#tree5').treeview('uncheckNode', node.nodeId, {
            silent: true
        });
        if (node.nodes != null && node.nodes.length > 0) {
            for (var i in node.nodes) {
                uncheckAllSon2(node.nodes[i]);
            }
        }
    }
    //打开上一张图片
    /*
    nowId为选择的节点id,
    ids为图片数组
    Id为借阅id
    treeNum分辨哪个treeview
     */
    function openpre(lxNodes,id,Id,treeNum) {
        preid = id;
        var upanddownImgVo = {
            'id':id,
            'type':0,
            'lxNodes':lxNodes,
        };
        $.ajax({
            url: '/jy/api/upanddownImg',
            type: 'post',
            dataType:'JSON',
            data: JSON.stringify(upanddownImgVo),
            cache: false,
            contentType: 'application/json; charset=UTF-8',
            processData: false,
            //dataType: "json",
            async: false,
            success: function (result) {
                if(result.code == 200){
                    var id = result.data;
                    preid = id;
                    kdid = id;
                    if(treeNum == 3){
                        $('#tree3Img').attr('dataUrl', '/jy/api/getImg?path='+id+'&jyId='+Id);
                        viewer = new Viewer(document.getElementById('tree3'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        openpre(lxNodes,id,Id,3);
                                    }

                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        opennext(lxNodes,id,Id,3)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }else if(treeNum == 2){
                        $('#tree2Img').attr('dataUrl', '/jy/api/getImg?path='+id+'&jyId='+Id);
                        viewer2 = new Viewer(document.getElementById('tree2'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer2.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    click:function(){
                                        viewer2.destroy();
                                        openpre(lxNodes,id,Id,2);
                                    }
                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer2.destroy();
                                        opennext(lxNodes,id,Id,2)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }
                }else {
                    cxAlertts("已经是第一张");
                    if(treeNum == 3){
                        $('#tree3Img').attr('dataUrl', '/jy/api/getImg?path='+preid+'&jyId='+Id);
                        viewer = new Viewer(document.getElementById('tree3'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        openpre(lxNodes,preid,Id,3);
                                    }

                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        opennext(lxNodes,preid,Id,3)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }else if(treeNum == 2){
                        $('#tree2Img').attr('dataUrl', '/jy/api/getImg?path='+preid+'&jyId='+Id);
                        viewer2 = new Viewer(document.getElementById('tree2'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer2.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    click:function(){
                                        viewer2.destroy();
                                        openpre(lxNodes,preid,Id,2);
                                    }
                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer2.destroy();
                                        opennext(lxNodes,preid,Id,2)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }
                }
            }
        });
    }
    //打开下一张
    function opennext(lxNodes,id,Id,treeNum) {
        nextid = id;
        var upanddownImgVo = {
            'id':id,
            'type':1,
            'lxNodes':lxNodes,
        };
        $.ajax({
            url: '/jy/api/upanddownImg',
            type: 'post',
            dataType:'JSON',
            data: JSON.stringify(upanddownImgVo),
            cache: false,
            contentType: 'application/json; charset=UTF-8',
            processData: false,
            //dataType: "json",
            async: false,
            success: function (result) {
                if(result.code == 200){
                    var id = result.data;
                    nextid = id;
                    kdid = id;
                    if(treeNum == 3){
                        $('#tree3Img').attr('dataUrl', '/jy/api/getImg?path='+id+'&jyId='+Id);
                        viewer = new Viewer(document.getElementById('tree3'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        openpre(lxNodes,id,Id,3);
                                    }

                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        opennext(lxNodes,id,Id,3)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }else if(treeNum == 2){
                        $('#tree2Img').attr('dataUrl', '/jy/api/getImg?path='+id+'&jyId='+Id);
                        viewer2 = new Viewer(document.getElementById('tree2'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer2.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    click:function(){
                                        viewer2.destroy();
                                        openpre(lxNodes,id,Id,2);
                                    }
                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer2.destroy();
                                        opennext(lxNodes,id,Id,2)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }
                }else {
                    cxAlertts("已经是最后一张");
                    if(treeNum == 3){
                        $('#tree3Img').attr('dataUrl', '/jy/api/getImg?path='+nextid+'&jyId='+Id);
                        viewer = new Viewer(document.getElementById('tree3'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        openpre(lxNodes,nextid,Id,3);
                                    }

                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        opennext(lxNodes,nextid,Id,3)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }else if(treeNum == 2){
                        $('#tree2Img').attr('dataUrl', '/jy/api/getImg?path='+nextid+'&jyId='+Id);
                        viewer2 = new Viewer(document.getElementById('tree2'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer2.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    click:function(){
                                        viewer2.destroy();
                                        openpre(lxNodes,nextid,Id,2);
                                    }
                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer2.destroy();
                                        opennext(lxNodes,nextid,Id,2)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }
                }
            }
        });
    }

    var vue = new Vue({
        el: '#yhgl',
        data: {
            rgyjzf:null,
            clButton:true,
            daButton:false,
            cl:false,
            da:true,
            allShy:null,
            keyword:null,
            gryf:{//个人用房
                id:null,
                dabh:null,//档案编号
                townBsc:null,//镇/办事处
                villageJwh:null,//村/居委会
                sqr:null,//申请人
                sqsx:null,//申请事项
                spsj:null,//审批时间
                sqcl:null,//申请材料
                bz:null,//备注
                qsym:null,//起始页码
                zzym:null,//终止页码
                zys:null,//总页数
                zhh:null,//总盒号
                year:null,//年份
                typeId:null,//类型id
                typeName:null,//类型名称
                inputtime:null,//登记时间
                djr:null,//登记人
                year:null,//年份
            },
        },
        methods: {
            surebtg:function(){
                var url;
                url = '/dalr/api/rgaudit?id='+rgid+'&rgyj=退回&flag='+1;
                var myMsg = cxLoad("退回中");
                this.$http.get(url).then( function (result) {
                    parent.refresh();
                    var data = result.body;
                    if(data.code == 200){
                        layer.close(myMsg);
                        cxAlertOk("该档案已退回");
                        top.addTabs({
                            id: "90016",
                            text: "入馆审核",
                            icon: "fa fa-tasks",
                            url: "rgsh",
                            targetType: "iframe-tab",
                            close:true,
                        });
                    }
                })
            },
            suretg:function(){
                var url;
                url = '/dalr/api/rgaudit?id='+rgid+'&rgyj=通过&flag='+4;
                var myMsg = cxLoad("通过中");
                this.$http.get(url).then( function (result) {
                    parent.refresh();
                    var data = result.body;
                    if(data.code == 200){
                        layer.close(myMsg);
                        //top.closeTabByPageId(190011211);
                        cxAlertOk("已通过");
                        top.addTabs({
                            id: "90016",
                            text: "入馆审核",
                            icon: "fa fa-tasks",
                            url: "rgsh",
                            targetType: "iframe-tab",
                            close:true,
                        });

                    }
                })
            },
            closezf:function(){
                $('#zfrgyjModal').modal('hide');
            },
            zf:function(){
                $('#zfrgyjModal').modal('show');
            },
            surezf:function(){
                $('#zfrgyjModal').modal('hide');
                var url;
                if(this.rgyjzf == null){
                    url = '/dalr/api/rgaudit?id='+rgid+'&flag='+3
                }else {
                    url = '/dalr/api/rgaudit?id='+rgid+'&rgyj='+this.rgyjzf+'&flag='+3;
                }
                var myMsg = cxLoad("作废中");
                this.$http.get(url).then( function (result) {
                    parent.refresh();
                    var data = result.body;
                    if(data.code == 200){
                        layer.close(myMsg);
                        //top.closeTabByPageId(190011211);
                        cxAlertOk("废弃成功");
                        top.addTabs({
                            id: "90016",
                            text: "入馆审核",
                            icon: "fa fa-tasks",
                            url: "rgsh",
                            targetType: "iframe-tab",
                            close:true,
                        });
                    }
                })
            },
        },
        created: function () {
            this.$http.get('/listShUser').then( function (result) {
                var data = result.body;
                if(data.code == 200){
                    this.allShy = data.data;
                }else{
                    cxAlert(data.mess);
                }
            })
        },
        mounted: function () {
            var that = this;
            var url = location.search;
            id = url.substring(0,url.indexOf("&"));
            id = id.substring(id.indexOf("=")+1);
            rgid = id;
            var url2 = url.substring(url.indexOf("&")+1);
            var dabh = url2.substring(url2.indexOf("=")+1)
            $.get("/dalr/api/queryRgDaxx?dabh=" + dabh, function (result) {
                if (result.code == 200) {
                    kdtreeNum = 3;
                    var data = result.data;
                    var lxNodes = data.lxNodes;
                    kdLxNodes = data.lxNodes;
                    vue.$data.gryf = data.gryfKj;
                    if(data.lxNodes[0].nodes == null){
                        $('#tree5').treeview({
                            color: "#428bca",
                            collapseIcon: "glyphicon glyphicon-minus",//可收缩的节点图标
                            // nodeIcon: "glyphicon glyphicon-user",
                            emptyIcon: "glyphicon glyphicon-folder-open",//设置列表树中没有子节点的节点的图标
                            expandIcon: "glyphicon glyphicon-plus",  //设置列表上中有子节点的图标
                            highlightSearchResults: true,//是否高亮搜索结果 默认true
                            highlightSelected: true,     //是否选中高亮显示
                            onhoverColor: "#f5f5f5",    //鼠标滑过的颜色
                            levels: 0 ,// 设置初始化展开几级菜单 默认为2
                            showBorder: true,                //是否显示边框
                            data: data.lxNodes,
                            //showCheckbox: true,
                            multiSelect: false,
                            onNodeChecked: nodeChecked,
                            onNodeUnchecked: nodeUnchecked,
                            onNodeSelected: function (event, data) {
                                var id = data.id;
                                kdid = data.id;
                                id = decodeURIComponent(id);
                                id =  id.toLowerCase();

                                if(id.indexOf(".png")!=-1|| id.indexOf(".jpg")!=-1){
                                    $('#tree3Img').attr('dataUrl', '/jy/api/getImg?path='+data.id+'&jyId='+Id);
                                    viewer = new Viewer(document.getElementById('tree3'), {
                                        inline: true,
                                        url: 'dataUrl',
                                        //navbar: false,
                                        zIndexInline: 9999,
                                        button: true,
                                        fullscreen:false,
                                        backdrop: true,
                                        keyboard:true,
                                        navbar:false,
                                        toolbar: {
                                            zoomIn: {
                                                show: 1,
                                                click: function () {
                                                    viewer.destroy();
                                                }
                                            },
                                            zoomOut: 0,
                                            oneToOne: 0,
                                            reset: 0,
                                            prev: {
                                                show:1,
                                                click: function(){
                                                    viewer.destroy();
                                                    openpre(lxNodes,data.id,Id,3)
                                                }

                                            },
                                            next: {
                                                show:1,
                                                click: function(){
                                                    viewer.destroy();
                                                    opennext(lxNodes,data.id,Id,3)
                                                }

                                            },
                                            rotateLeft: 1,
                                            rotateRight: 1,
                                            flipHorizontal: 0,
                                            flipVertical: 0,
                                        },
                                    });
                                }else if(id.indexOf(".pdf")!=-1){
                                    var u = "/jy/api/getPdf/"+id+"/"+Id;
                                    //var u = "/jy/api/getPdf/"+dah+"/"+clxxName+"/"+data.id+"/"+Id;

                                    top.addTabs({
                                        id: "63233",
                                        text: "PDF浏览器",
                                        icon: "fa fa-circle-o",
                                        url: "/static/pdf/web/viewer.html?file="+u,
                                        targetType: "iframe-tab",
                                        close:true
                                    });
                                }
                            }
                        });
                    }else {
                        $('#tree5').treeview({
                            color: "#428bca",
                            collapseIcon: "glyphicon glyphicon-minus",//可收缩的节点图标
                            // nodeIcon: "glyphicon glyphicon-user",
                            emptyIcon: "glyphicon glyphicon-file",//设置列表树中没有子节点的节点的图标
                            expandIcon: "glyphicon glyphicon-plus",  //设置列表上中有子节点的图标
                            highlightSearchResults: true,//是否高亮搜索结果 默认true
                            highlightSelected: true,     //是否选中高亮显示
                            onhoverColor: "#f5f5f5",    //鼠标滑过的颜色
                            levels: 0 ,// 设置初始化展开几级菜单 默认为2
                            showBorder: true,                //是否显示边框
                            data: data.lxNodes,
                            //showCheckbox: true,
                            multiSelect: false,
                            onNodeChecked: nodeChecked,
                            onNodeUnchecked: nodeUnchecked,
                            onNodeSelected: function (event, data) {
                                var id = data.id;
                                kdid = data.id;
                                id = decodeURIComponent(id);
                                id =  id.toLowerCase();

                                if(id.indexOf(".png")!=-1|| id.indexOf(".jpg")!=-1){
                                    $('#tree3Img').attr('dataUrl', '/jy/api/getImg?path='+data.id+'&jyId='+Id);
                                    viewer = new Viewer(document.getElementById('tree3'), {
                                        inline: true,
                                        url: 'dataUrl',
                                        //navbar: false,
                                        zIndexInline: 9999,
                                        button: true,
                                        fullscreen:false,
                                        backdrop: true,
                                        keyboard:true,
                                        navbar:false,
                                        toolbar: {
                                            zoomIn: {
                                                show: 1,
                                                click: function () {
                                                    viewer.destroy();
                                                }
                                            },
                                            zoomOut: 0,
                                            oneToOne: 0,
                                            reset: 0,
                                            prev: {
                                                show:1,
                                                click: function(){
                                                    viewer.destroy();
                                                    openpre(lxNodes,data.id,Id,3)
                                                }

                                            },
                                            next: {
                                                show:1,
                                                click: function(){
                                                    viewer.destroy();
                                                    opennext(lxNodes,data.id,Id,3)
                                                }

                                            },
                                            rotateLeft: 1,
                                            rotateRight: 1,
                                            flipHorizontal: 0,
                                            flipVertical: 0,
                                        },
                                    });
                                }else if(id.indexOf(".pdf")!=-1){
                                    var u = "/jy/api/getPdf/"+id+"/"+Id;
                                    //var u = "/jy/api/getPdf/"+dah+"/"+clxxName+"/"+data.id+"/"+Id;

                                    top.addTabs({
                                        id: "63233",
                                        text: "PDF浏览器",
                                        icon: "fa fa-circle-o",
                                        url: "/static/pdf/web/viewer.html?file="+u,
                                        targetType: "iframe-tab",
                                        close:true
                                    });
                                }
                            }
                        });
                    }
                }else{
                    cxAlert(result.mess)
                }
            });
        }
    });


</script>

</body>
</html>
